package com.example.springboot.controller;

import com.example.springboot.dto.EmailReqDTO;
import com.example.springboot.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.logging.Logger;

@RestController
public class EmailController {
    private static final Logger logger = Logger.getLogger(EmailController.class.getName());
    @Autowired
    private EmailService emailService;
    @PostMapping("/test/sendMsg")
    public void sendEmailInfo(@RequestBody EmailReqDTO emailReqDTO)  {

        emailService.sendEmail(emailReqDTO);
    }
}
